//
//  HEHomeAdBannerCell.m
//  HealthFamily
//
//  Created by 吴欧 on 2021/5/24.
//  Copyright © 2021 honglutec. All rights reserved.
//

#import "HEHomeAdBannerCell.h"

@interface HEHomeAdBannerCell ()

@property (nonatomic, strong) UIImageView *bannerImage;

@end

@implementation HEHomeAdBannerCell
 
- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self initUI];
    }
    return self;
}

- (void)initUI {
    _bannerImage = [UIImageView new];
//    _bannerImage.contentMode = UIViewContentModeScaleAspectFill;
    _bannerImage.layer.cornerRadius = 10;
    _bannerImage.layer.masksToBounds = YES;
    _bannerImage.clipsToBounds = YES;
    [self.contentView addSubview:_bannerImage];
    
    [_bannerImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).mas_offset(0);
        make.left.equalTo(self.contentView).mas_offset(0);
        make.right.equalTo(self.contentView).mas_offset(-0);
        make.height.mas_offset(80);
        make.bottom.equalTo(self.contentView).mas_offset(-0);
    }];
}

- (void)configCellWithFiterModel:(GDFiterCellModel *)fiterModel indexPath:(NSIndexPath *)indexPath {
    _bannerImage.image = (UIImage *)fiterModel.cellData;
}

@end
